include  ./Makefile.param


#CFLAGS := -Wall -ggdb3 $(INC_PATH) #GDB
CFLAGS := -Wall -g $(INC_PATH)


SAMPLE_OBJS := $(SAMPLE_SRCS:%.c=%.o)
MAIN_SAMPLE_OBJS := $(MAIN_SAMPLE_SRCS:%.c=%.o)

BIN := main
MAIN_BIN:=minigui

all :$(BIN) $(MAIN_BIN)
.PHONY : clean all

$(BIN) :$(SAMPLE_OBJS)
	#$(CC) $(LIBS) -lz  $(CFLAGS) -lpthread  -o $@ $^  -lminigui_ths -ljpeg -lpng -ldl -lm -lfreetype -lmgi
	#$(CC) $(LIBS) -lz  $(CFLAGS) -lpthread  -o $@ $^  -ljpeg -lpng -ldl -lm
	$(CC) $(CFLAGS) -g -lpthread -lm -o $@ $^  $(LIBS) 
	
$(MAIN_BIN) :$(MAIN_SAMPLE_OBJS)
	#$(CC) $(LIBS) -lz  $(CFLAGS) -lpthread  -o $@ $^  -lminigui_ths -ljpeg -lpng -ldl -lm -lfreetype -lmgi
	#$(CC) $(LIBS) -lz  $(CFLAGS) -lpthread  -o $@ $^  -ljpeg -lpng -ldl -lm
	$(CC) $(CFLAGS) -g -lpthread -lm -o $@ $^  $(LIBS) 	
	
clean:
	@rm -f $(BIN)
	@rm -f $(SAMPLE_OBJS)
	@rm -f $(MAIN_BIN)
	@rm -f $(MAIN_SAMPLE_OBJS)

strip:
	$(STR) $(BIN)

